Skip to content

fix: update masking API endpoints to match current Bytebase API#96

Merged
adela-bytebase merged 2 commits intomainfrom
fix/update-masking-api-endpoints
Apr 20, 2026
Merged

fix: update masking API endpoints to match current Bytebase API#96
adela-bytebase merged 2 commits intomainfrom
fix/update-masking-api-endpoints

Conversation

@adela-bytebase
Copy link
Copy Markdown
Contributor

Summary

  • Update all masking API endpoints to match the current Bytebase API (post v3.7 migration)
  • Setting names: bb.workspace.semantic-typesSEMANTIC_TYPES, bb.workspace.data-classificationDATA_CLASSIFICATION
  • Policy URLs: policies/masking_ruleworkspaces/-/policies/masking_rule (workspace prefix required)
  • Masking exception → exemption: renamed policy type, JSON fields, and data file
  • CEL expressions: add resource. prefix, use integer classification levels
  • JSON body fields: semanticTypeSettingValuesemanticType, data_classification_setting_valuedataClassification
  • Masking exemption: action field removed, membermembers (array)

Companion docs PR: bytebase/bytebase.com#1080

Test plan

  • Run workflow 1 (semantic type + global masking rule) against a test Bytebase instance
  • Run workflow 2 (column masking + masking exemption) against a test Bytebase instance
  • Run workflow 3 (classification) against a test Bytebase instance

🤖 Generated with Claude Code

Breaking API changes addressed:
- Setting names: bb.workspace.semantic-types → SEMANTIC_TYPES,
  bb.workspace.data-classification → DATA_CLASSIFICATION (migrated in v3.7)
- Policy URLs: policies/masking_rule → workspaces/-/policies/masking_rule
  (workspace prefix required by gRPC-gateway route)
- Masking exception → exemption: renamed policy type, JSON fields, and
  data file (masking_exception → masking_exemption, maskingExceptionPolicy
  → maskingExemptionPolicy, maskingExceptions → exemptions)
- CEL expressions: add resource. prefix (resource.environment_id,
  resource.classification_level)
- Classification levels: id (string) → level (integer), levelId → level
- JSON body fields: semanticTypeSettingValue → semanticType,
  data_classification_setting_value → dataClassification
- Masking exemption: action field removed, member → members (array)

Companion docs PR: bytebase/bytebase.com#1080

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Query params allowMissing and updateMask use camelCase as documented
in the Bytebase OpenAPI spec at api.bytebase.com.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@adela-bytebase adela-bytebase merged commit a0ab5db into main Apr 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant